var path = require('path');
module.exports = {
    watch: true,
    mode: 'production',
    entry: "./test/src/index.js",//入口文件
    output: {//打包输出的文件
        path: __dirname,
        filename: "./test/bundle.js"
    },
    module: {
        rules: [
            {
                test: path.join(__dirname, 'es6'),
                loader: 'babel-loader',
                query: {
                    presets: ['es2015']
                }
            }
        ]
    }
};